package com.jumi.microservice.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jumi.microservice.dto.reponse.FenXiaoReponse;
import com.jumi.microservice.entity.CommonGroup;
import com.jumi.microservice.service.IJmUserFenxiaoService;
import com.jumi.microservice.entity.JmUserFenxiao;
import com.jumi.microservice.mapper.JmUserFenxiaoMapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;


/**
 * <p>
 * 用户收益表 服务实现类
 * </p>
 *
 * @author 要挑客户管理团队
 * @since 2020-07-14
 */
@Service
public class JmUserFenxiaoServiceImpl extends ServiceImpl<JmUserFenxiaoMapper, JmUserFenxiao> implements IJmUserFenxiaoService{


    @Autowired
    JmUserFenxiaoMapper mapper;

    @Override
    public Page getPage(Page page, Wrapper wrapper) {
        return mapper.fenXiaoPage(page,wrapper);
    }

    @Override
    public BigDecimal getSumYongJin(Wrapper wrapper) {
        return mapper.getSumYongJin(wrapper);
    }



    public List<FenXiaoReponse> getSumYongJinByColumn(Wrapper wrapper){
        return mapper.getSumYongJinByColumn(wrapper);
    };

    @Override
    public List<CommonGroup> getSumYongJinByType(Wrapper wrapper) {
        return mapper.getSumYongJinByType(wrapper);
    }

    @Override
    public Page getFenXiaoDetail(Page page, QueryWrapper wrapper) {
        return mapper.getFenXiaoDetail(page,wrapper);
    }
}
